interface FormItemProps {
  id?: number;
  /** 用于判断是`新增`还是`修改` */
  title: string;
  nickname: string;
  username: string;
  password: string;
  phone: string | number;
  openid?: string;
  unionid?: string;
  gender?: string | number;
  birthday?: string;
  country?: string;
  province?: string;
  city?: string;
  avatar?: string;
  enable: number;
  description?: string;
}

// 用户数据接口，对应后端返回的用户信息
interface UserData {
  id: number;
  username: string;
  nickname?: string;
  password?: string;
  phone?: string;
  openid?: string;
  unionid?: string;
  gender?: number;
  birthday?: string;
  country?: string;
  province?: string;
  city?: string;
  avatar?: string;
  enable: number;
  description?: string;
  create_at?: string;
  update_at?: string;
}
interface FormProps {
  formInline: FormItemProps;
}

interface RoleFormItemProps {
  username: string;
  nickname: string;
  /** 角色列表 */
  roleOptions: any[];
  /** 选中的角色列表 */
  ids: number[];
}
interface RoleFormProps {
  formInline: RoleFormItemProps;
}

export type { FormItemProps, FormProps, RoleFormItemProps, RoleFormProps, UserData };
